package com.jm.offer.easy;

/**
 * @Description https://leetcode-cn.com/problems/que-shi-de-shu-zi-lcof/
 * @date 2022/4/25 15:30
 */
public class _53_II_缺失的数字 {

    public static void main(String[] args) {
        int[] nums = {0,1,3};
        System.out.println(missingNumber(nums));
    }

    public static int missingNumber(int[] nums) {
        int i;
        for (i = 0; i < nums.length; i++) {
            if (i != nums[i]){
                return i;
            }
        }
        return i;
    }

}
